# Class Challenge

In previous lab activities you practiced basic skills for programming and manipulating the robot using the servos and feedback from the ultrasonic sensor. The original in-class challenge was to navigate along a wall, perform a turn, navigate along a second wall and pass through a gate as shown below.

An image

The challenge was constrained to keep the servo-powered wheels from touching a tape line and to perform the task in the fastest possible time, competing with other teams in the class. In the virtual environment, we are giving you a nearly equivalent challenge to the original. To prepare you were to develop and test a Follow the Wall strategy. Employ a similar strategy to the more complex navigation challenge given.


Note: Your final solution should not use a hard-coded strategy. You should be able to modify your code for a challenge with different coin distances from the walls.

Instructions

The coins are approximately 110 cm away from the top wall and approximately 70 cm from the right wall. Use the data from the ultrasonic sensor to navigate the robot to collect all coins.

HINT

Start with a strategy that allows you to follow the wall at any distance that you specify. Then after following the top wall at the distance that gets you all the coins, rotate to the next wall and change the distance you want to be away from that wall using the same strategy.